package hnlg.com.cn.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import hnlg.com.cn.mapper.LocationMapper;
import hnlg.com.cn.service.LocationService;
import hnlg.com.cn.vo.Location;

@Service("locationservice")
@Transactional(value="txManager",rollbackFor=Exception.class)
public class LocationServiceImpl implements LocationService {
    @Autowired
	LocationMapper obj;
	@Override
	public boolean addLocation(Location location) throws Exception {
		
		return obj.addLocation(location);
	}

	@Override
	public boolean deleteLocation(int id) throws Exception {
		
		return obj.deleteLocation(id);
	}

	@Override
	public boolean updateLocation(Location location) throws Exception {
		
		return obj.updateLocation(location);
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public List<Location> queryLocation(Location location) throws Exception {
		
		return obj.queryLocation(location);
	}

	@Override
	public boolean deleteBatch(String[] arr) throws Exception {
		
		return obj.deleteBatch(arr);
	}

}
